
//
// 110701 - AH - (Bybanen) Created.
//

package org.soekrat.engine.io.responsexml;

import org.soekrat.engine.io.xmlutil.XmlTopContentGenerator;

/**
 * <p>
 *   {@link XmlTopContentGenerator} that together with 
 *   {@link ExchangeXmlContentGenerator} generate request response XML.
 * </p>
 * @author Arne Halvorsen (AH)
 * @author Laetitia Le Chatton (LLC)
 */
public class RequestResponseXmlTopContentGenerator 
  extends XmlTopContentGenerator 
{
  private String m_user=null;
  
  private String m_rat=null;
  
  private String m_errMsg=null;
  
  /**
   * <p>
   *   Constructor.
   * </p>
   */
  public RequestResponseXmlTopContentGenerator() 
  {
    super("soekrat-request-response");
  }
  
  /**
   * <p>
   *   Sets name on user that made request.
   * </p>
   * @param visitor Name on user or {@code null} if to clear.
   * @return {@code this}.
   */
  public RequestResponseXmlTopContentGenerator setUser(String user)
  {
    m_user=user;
    return this;
  }
  
  /**
   * <p>
   *   Gets name on user that made request.
   * </p>
   * @return User name or {@code null} if not sat.
   */
  public String getUser(){ return m_user; }
  
  /**
   * <p>
   *   Sets name on rat that request is for.
   * </p>
   * @param rat Name on rat or {@code null} if to clear.
   * @return {@code this}.
   */
  public RequestResponseXmlTopContentGenerator setRat(String rat)
  {
    m_rat=rat;
    return this;
  }
  
  /**
   * <p>
   *   Gets name on rat request is for.
   * </p>
   * @return Name on rat or {@code null} if not sat.
   */
  public String getRat(){ return m_rat; }
  
}
